﻿/*****************************************************************
* Project: HFW Framework
*****************************************************************
* Developer: Hdhoan
* Date created: 11/2010
* Modified:
******************************************************************/
namespace HFW.Share
{
    using Janus.Windows.EditControls;
    using Janus.Windows.Ribbon;
    using Janus.Windows.UI;
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Windows.Forms;

    public class frmShowMessageDialog : Form
    {
        private UIButton btnOne;
        private UIButton btnThree1;
        private UIButton btnThree2;
        private UIButton btnThree3;
        private UIButton btnTwo1;
        private UIButton btnTwo2;
        private double captionLength;
        private IContainer components;
        private const int FORM_HEADER_HEIGHT = 30;
        private double formWidth;
        private Label lblPrompt;
        private const int LINE_SPACING = 1;
        private int maxWidth;
        private string mCaption;
        private MessageBoxButtons msgButtons;
        private MessageBoxDefaultButton msgDefaultButton;
        private PictureBox msgIcon;
        private MessageBoxIcon msgIcons;
        private string mText;
        private OfficeFormAdorner officeFormAdorner1;
        private int orgHeight;
        private Panel pnlBottom;
        private Panel pnlHandle;
        private Panel pnlIcon;
        private Panel pnlMain;
        private Panel pnlOne;
        private Panel pnlRight;
        private Panel pnlThree;
        private Panel pnlTop;
        private Panel pnlTwo;
        private double promptLength;
        private double rowCount;
        private string[] strMsgArr;

        public frmShowMessageDialog()
        {
            this.InitializeComponent();
            this.orgHeight = base.Height;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private int getLengthText(string strText, ref string strMaxLengthLine)
        {
            int length = 0;
            int index = 0;
            this.strMsgArr = strText.Split(Environment.NewLine.ToCharArray());
            strMaxLengthLine = this.strMsgArr[0];
            length = strMaxLengthLine.Length;
            for (index = 1; index < (this.strMsgArr.Length - 1); index++)
            {
                if (length < this.strMsgArr[index].Length)
                {
                    strMaxLengthLine = this.strMsgArr[index];
                    length = strMaxLengthLine.Length;
                }
            }
            return length;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new Container();
            this.pnlHandle = new Panel();
            this.pnlOne = new Panel();
            this.btnOne = new UIButton();
            this.pnlTwo = new Panel();
            this.btnTwo2 = new UIButton();
            this.btnTwo1 = new UIButton();
            this.pnlThree = new Panel();
            this.btnThree3 = new UIButton();
            this.btnThree2 = new UIButton();
            this.btnThree1 = new UIButton();
            this.pnlIcon = new Panel();
            this.msgIcon = new PictureBox();
            this.pnlMain = new Panel();
            this.lblPrompt = new Label();
            this.pnlRight = new Panel();
            this.pnlBottom = new Panel();
            this.pnlTop = new Panel();
            this.officeFormAdorner1 = new OfficeFormAdorner(this.components);
            this.pnlHandle.SuspendLayout();
            this.pnlOne.SuspendLayout();
            this.pnlTwo.SuspendLayout();
            this.pnlThree.SuspendLayout();
            this.pnlIcon.SuspendLayout();
            ((ISupportInitialize) this.msgIcon).BeginInit();
            this.pnlMain.SuspendLayout();
            ((ISupportInitialize) this.officeFormAdorner1).BeginInit();
            base.SuspendLayout();
            this.pnlHandle.Controls.Add(this.pnlOne);
            this.pnlHandle.Controls.Add(this.pnlTwo);
            this.pnlHandle.Controls.Add(this.pnlThree);
            this.pnlHandle.Dock = DockStyle.Bottom;
            this.pnlHandle.Location = new Point(0, 100);
            this.pnlHandle.Name = "pnlHandle";
            this.pnlHandle.Size = new Size(0x13f, 0x22);
            this.pnlHandle.TabIndex = 0;
            this.pnlOne.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
            this.pnlOne.Controls.Add(this.btnOne);
            this.pnlOne.Location = new Point(0x52, 0);
            this.pnlOne.Name = "pnlOne";
            this.pnlOne.Size = new Size(0x9b, 0x1a);
            this.pnlOne.TabIndex = 1;
            this.pnlOne.Visible = false;
            this.btnOne.Anchor = AnchorStyles.Bottom | AnchorStyles.Top;
            this.btnOne.DialogResult = DialogResult.OK;
            this.btnOne.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.btnOne.Location = new Point(0x27, 1);
            this.btnOne.Name = "btnOne";
            this.btnOne.ShowFocusRectangle = false;
            this.btnOne.Size = new Size(0x4c, 0x18);
            this.btnOne.TabIndex = 0;
            this.btnOne.Text = "Button3";
            this.btnOne.UseCompatibleTextRendering = true;
            this.btnOne.VisualStyle = VisualStyle.Office2007;
            this.pnlTwo.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
            this.pnlTwo.Controls.Add(this.btnTwo2);
            this.pnlTwo.Controls.Add(this.btnTwo1);
            this.pnlTwo.Location = new Point(0x30, 0);
            this.pnlTwo.Name = "pnlTwo";
            this.pnlTwo.Size = new Size(0xdf, 0x1a);
            this.pnlTwo.TabIndex = 2;
            this.pnlTwo.Visible = false;
            this.btnTwo2.Anchor = AnchorStyles.Bottom | AnchorStyles.Top;
            this.btnTwo2.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.btnTwo2.Location = new Point(0x76, 1);
            this.btnTwo2.Name = "btnTwo2";
            this.btnTwo2.ShowFocusRectangle = false;
            this.btnTwo2.Size = new Size(0x4c, 0x18);
            this.btnTwo2.TabIndex = 1;
            this.btnTwo2.Text = "Button3";
            this.btnTwo2.UseCompatibleTextRendering = true;
            this.btnTwo2.VisualStyle = VisualStyle.Office2007;
            this.btnTwo1.Anchor = AnchorStyles.Bottom | AnchorStyles.Top;
            this.btnTwo1.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.btnTwo1.Location = new Point(0x1c, 1);
            this.btnTwo1.Name = "btnTwo1";
            this.btnTwo1.ShowFocusRectangle = false;
            this.btnTwo1.Size = new Size(0x4c, 0x18);
            this.btnTwo1.TabIndex = 0;
            this.btnTwo1.Text = "Button2";
            this.btnTwo1.UseCompatibleTextRendering = true;
            this.btnTwo1.VisualStyle = VisualStyle.Office2007;
            this.pnlThree.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
            this.pnlThree.Controls.Add(this.btnThree3);
            this.pnlThree.Controls.Add(this.btnThree2);
            this.pnlThree.Controls.Add(this.btnThree1);
            this.pnlThree.Location = new Point(12, 0);
            this.pnlThree.Name = "pnlThree";
            this.pnlThree.Size = new Size(0x127, 0x1a);
            this.pnlThree.TabIndex = 3;
            this.pnlThree.Visible = false;
            this.btnThree3.Anchor = AnchorStyles.Bottom | AnchorStyles.Top;
            this.btnThree3.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.btnThree3.Location = new Point(0xc3, 1);
            this.btnThree3.Name = "btnThree3";
            this.btnThree3.ShowFocusRectangle = false;
            this.btnThree3.Size = new Size(0x4c, 0x18);
            this.btnThree3.TabIndex = 2;
            this.btnThree3.Text = "Bỏ qua";
            this.btnThree3.UseCompatibleTextRendering = true;
            this.btnThree3.VisualStyle = VisualStyle.Office2007;
            this.btnThree2.Anchor = AnchorStyles.Bottom | AnchorStyles.Top;
            this.btnThree2.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.btnThree2.Location = new Point(0x71, 1);
            this.btnThree2.Name = "btnThree2";
            this.btnThree2.ShowFocusRectangle = false;
            this.btnThree2.Size = new Size(0x4c, 0x18);
            this.btnThree2.TabIndex = 1;
            this.btnThree2.Text = "L\x00e0m lại";
            this.btnThree2.UseCompatibleTextRendering = true;
            this.btnThree2.VisualStyle = VisualStyle.Office2007;
            this.btnThree1.Anchor = AnchorStyles.Bottom | AnchorStyles.Top;
            this.btnThree1.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.btnThree1.Location = new Point(0x1f, 1);
            this.btnThree1.Name = "btnThree1";
            this.btnThree1.ShowFocusRectangle = false;
            this.btnThree1.Size = new Size(0x4c, 0x18);
            this.btnThree1.TabIndex = 0;
            this.btnThree1.Text = "Đồng \x00fd";
            this.btnThree1.UseCompatibleTextRendering = true;
            this.btnThree1.VisualStyle = VisualStyle.Office2007;
            this.pnlIcon.BackColor = Color.Transparent;
            this.pnlIcon.Controls.Add(this.msgIcon);
            this.pnlIcon.Dock = DockStyle.Left;
            this.pnlIcon.Location = new Point(0, 0);
            this.pnlIcon.Name = "pnlIcon";
            this.pnlIcon.Size = new Size(0x38, 100);
            this.pnlIcon.TabIndex = 10;
            this.msgIcon.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.msgIcon.Location = new Point(12, 9);
            this.msgIcon.Name = "msgIcon";
            this.msgIcon.Size = new Size(0x20, 0x4c);
            this.msgIcon.SizeMode = PictureBoxSizeMode.CenterImage;
            this.msgIcon.TabIndex = 4;
            this.msgIcon.TabStop = false;
            this.pnlMain.Controls.Add(this.lblPrompt);
            this.pnlMain.Controls.Add(this.pnlRight);
            this.pnlMain.Controls.Add(this.pnlBottom);
            this.pnlMain.Controls.Add(this.pnlTop);
            this.pnlMain.Dock = DockStyle.Fill;
            this.pnlMain.Location = new Point(0x38, 0);
            this.pnlMain.Name = "pnlMain";
            this.pnlMain.Size = new Size(0x107, 100);
            this.pnlMain.TabIndex = 11;
            this.lblPrompt.BackColor = Color.Transparent;
            this.lblPrompt.Dock = DockStyle.Fill;
            this.lblPrompt.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.lblPrompt.Location = new Point(0, 12);
            this.lblPrompt.Name = "lblPrompt";
            this.lblPrompt.Size = new Size(0x107, 0x4c);
            this.lblPrompt.TabIndex = 6;
            this.lblPrompt.Text = "Cộng h\x00f2a x\x00e3 hội chủ nghĩa Việt Nam";
            this.lblPrompt.TextAlign = ContentAlignment.MiddleLeft;
            this.pnlRight.Dock = DockStyle.Right;
            this.pnlRight.Location = new Point(0x107, 12);
            this.pnlRight.Name = "pnlRight";
            this.pnlRight.Size = new Size(0, 0x4c);
            this.pnlRight.TabIndex = 5;
            this.pnlBottom.BackColor = Color.Transparent;
            this.pnlBottom.Dock = DockStyle.Bottom;
            this.pnlBottom.Location = new Point(0, 0x58);
            this.pnlBottom.Name = "pnlBottom";
            this.pnlBottom.Size = new Size(0x107, 12);
            this.pnlBottom.TabIndex = 4;
            this.pnlTop.BackColor = Color.Transparent;
            this.pnlTop.Dock = DockStyle.Top;
            this.pnlTop.Location = new Point(0, 0);
            this.pnlTop.Name = "pnlTop";
            this.pnlTop.Size = new Size(0x107, 12);
            this.pnlTop.TabIndex = 3;
            this.officeFormAdorner1.Form = this;
            this.officeFormAdorner1.Office2007CustomColor = Color.Empty;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            this.BackColor = Color.FromArgb(0xc4, 0xdd, 0xff);
            base.ClientSize = new Size(0x13f, 0x86);
            base.ControlBox = false;
            base.Controls.Add(this.pnlMain);
            base.Controls.Add(this.pnlIcon);
            base.Controls.Add(this.pnlHandle);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.MaximizeBox = false;
            this.MaximumSize = new Size(450, 400);
            base.MinimizeBox = false;
            this.MinimumSize = new Size(0x143, 0x8f);
            base.Name = "frmShowMessageDialog";
            base.ShowIcon = false;
            base.ShowInTaskbar = false;
            this.Text = "Show Message";
            this.pnlHandle.ResumeLayout(false);
            this.pnlOne.ResumeLayout(false);
            this.pnlTwo.ResumeLayout(false);
            this.pnlThree.ResumeLayout(false);
            this.pnlIcon.ResumeLayout(false);
            ((ISupportInitialize) this.msgIcon).EndInit();
            this.pnlMain.ResumeLayout(false);
            ((ISupportInitialize) this.officeFormAdorner1).EndInit();
            base.ResumeLayout(false);
        }

        private void SetButtonText()
        {
            switch (this.msgButtons)
            {
                case MessageBoxButtons.OK:
                    this.pnlOne.Visible = true;
                    this.pnlTwo.Visible = false;
                    this.pnlThree.Visible = false;
                    this.btnOne.Text = "OK";
                    this.btnOne.DialogResult = DialogResult.OK;
                    return;

                case MessageBoxButtons.OKCancel:
                    this.pnlOne.Visible = false;
                    this.pnlThree.Visible = false;
                    this.pnlTwo.Visible = true;
                    this.btnTwo1.Text = "OK";
                    this.btnTwo1.DialogResult = DialogResult.OK;
                    this.btnTwo2.Text = "CANCEL";
                    this.btnTwo2.DialogResult = DialogResult.Cancel;
                    return;

                case MessageBoxButtons.AbortRetryIgnore:
                    this.pnlOne.Visible = false;
                    this.pnlTwo.Visible = false;
                    this.pnlThree.Visible = true;
                    this.btnThree1.Text = "ABORT";
                    this.btnThree1.DialogResult = DialogResult.Abort;
                    this.btnThree2.Text = "RETRY";
                    this.btnThree2.DialogResult = DialogResult.Retry;
                    this.btnThree3.Text = "IGNORE";
                    this.btnThree3.DialogResult = DialogResult.Ignore;
                    return;

                case MessageBoxButtons.YesNoCancel:
                    this.pnlOne.Visible = false;
                    this.pnlTwo.Visible = false;
                    this.pnlThree.Visible = true;
                    this.btnThree1.Text = "YES";
                    this.btnThree1.DialogResult = DialogResult.Abort;
                    this.btnThree2.Text = "NO";
                    this.btnThree2.DialogResult = DialogResult.Retry;
                    this.btnThree3.Text = "CANCEL";
                    this.btnThree3.DialogResult = DialogResult.Ignore;
                    return;

                case MessageBoxButtons.YesNo:
                    this.pnlOne.Visible = false;
                    this.pnlThree.Visible = false;
                    this.pnlTwo.Visible = true;
                    this.btnTwo1.Text = "YES";
                    this.btnTwo1.DialogResult = DialogResult.Yes;
                    this.btnTwo2.Text = "NO";
                    this.btnTwo2.DialogResult = DialogResult.No;
                    return;

                case MessageBoxButtons.RetryCancel:
                    this.pnlOne.Visible = false;
                    this.pnlThree.Visible = false;
                    this.pnlTwo.Visible = true;
                    this.btnTwo1.Text = "RETRY";
                    this.btnTwo1.DialogResult = DialogResult.Retry;
                    this.btnTwo2.Text = "CANCEL";
                    this.btnTwo2.DialogResult = DialogResult.Cancel;
                    return;
            }
        }

        private void SetDefaultButton()
        {
            switch (this.msgButtons)
            {
                case MessageBoxButtons.OK:
                    this.SetTabIndex(1, this.msgDefaultButton);
                    return;

                case MessageBoxButtons.OKCancel:
                case MessageBoxButtons.YesNo:
                case MessageBoxButtons.RetryCancel:
                    this.SetTabIndex(2, this.msgDefaultButton);
                    return;

                case MessageBoxButtons.AbortRetryIgnore:
                    this.SetTabIndex(3, this.msgDefaultButton);
                    break;

                case MessageBoxButtons.YesNoCancel:
                    break;

                default:
                    return;
            }
        }

        private void SetMessIcon()
        {
            switch (this.msgIcons)
            {
                case MessageBoxIcon.Question:
                    if (this.msgIcon.Image != null)
                    {
                        this.msgIcon.Image.Dispose();
                    }
                    this.msgIcon.Image = Properties.Resources.QuestionIcon;
                    break;

                case MessageBoxIcon.Exclamation:
                    if (this.msgIcon.Image != null)
                    {
                        this.msgIcon.Image.Dispose();
                    }
                    this.msgIcon.Image = Properties.Resources.WarningIcon;

                    break;

                case MessageBoxIcon.Asterisk:
                    if (this.msgIcon.Image != null)
                    {
                        this.msgIcon.Image.Dispose();
                    }
                    this.msgIcon.Image = Properties.Resources.InfoIcon;
                    break;

                case MessageBoxIcon.None:
                    if (this.msgIcon.Image != null)
                    {
                        this.msgIcon.Image.Dispose();
                    }
                    this.msgIcon.Image = null;
                    break;

                case MessageBoxIcon.Hand:
                    if (this.msgIcon.Image != null)
                    {
                        this.msgIcon.Image.Dispose();
                    }
                    this.msgIcon.Image = Properties.Resources.ErrorIcon;
                    break;
            }
            if (this.Text == string.Empty)
            {
                this.msgIcon.Top += 15;
            }
        }

        private void SetTabIndex(int buttonCount, MessageBoxDefaultButton msgDefaultButton)
        {
            switch (buttonCount)
            {
                case 1:
                    this.btnOne.TabIndex = 0;
                    return;

                case 2:
                    if (msgDefaultButton != MessageBoxDefaultButton.Button1)
                    {
                        this.btnTwo1.TabIndex = 1;
                        this.btnTwo2.TabIndex = 0;
                        return;
                    }
                    this.btnTwo1.TabIndex = 0;
                    this.btnTwo2.TabIndex = 1;
                    return;

                case 3:
                    switch (msgDefaultButton)
                    {
                        case MessageBoxDefaultButton.Button1:
                            this.btnThree1.TabIndex = 0;
                            this.btnThree2.TabIndex = 1;
                            this.btnThree3.TabIndex = 2;
                            return;

                        case MessageBoxDefaultButton.Button2:
                            this.btnThree1.TabIndex = 2;
                            this.btnThree2.TabIndex = 0;
                            this.btnThree3.TabIndex = 1;
                            return;

                        case MessageBoxDefaultButton.Button3:
                            this.btnThree1.TabIndex = 1;
                            this.btnThree2.TabIndex = 2;
                            this.btnThree3.TabIndex = 0;
                            return;
                    }
                    return;
            }
        }

        public DialogResult ShowDialog(string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons, MessageBoxDefaultButton msgDefaultButton)
        {
            double num = 0.0;
            this.mText = text;
            this.mCaption = caption;
            this.msgButtons = msgButtons;
            this.msgIcons = msgIcons;
            this.msgDefaultButton = msgDefaultButton;
            string strMaxLengthLine = "";
            this.promptLength = this.getLengthText(text, ref strMaxLengthLine);
            this.maxWidth = (this.MaximumSize.Width - this.pnlIcon.Width) - this.pnlRight.Width;
            this.captionLength = caption.Length;
            this.formWidth = ((this.pnlIcon.Width + (((double) (((int) this.promptLength) * this.lblPrompt.Font.Size)) / 1.77)) + this.pnlRight.Width) + 51.0;
            num = ((double) (((int) this.captionLength) * this.lblPrompt.Font.Size)) / 1.48;
            for (int i = 0; i < this.strMsgArr.Length; i++)
            {
                if ((this.strMsgArr[i] != string.Empty) && (this.strMsgArr[i] != Environment.NewLine))
                {
                    double num3 = 0.0;
                    num3 = ((double) (this.strMsgArr[i].Length * this.lblPrompt.Font.Size)) / 1.77;
                    if (num3 > this.maxWidth)
                    {
                        if ((num3 % ((double) this.maxWidth)) == 0.0)
                        {
                            this.rowCount++;
                        }
                        else
                        {
                            this.rowCount += ((((double) (this.strMsgArr[i].Length * this.lblPrompt.Font.Size)) / 1.77) / ((double) this.maxWidth)) + 1.0;
                        }
                    }
                    else
                    {
                        this.rowCount++;
                    }
                }
            }
            if (num > this.formWidth)
            {
                this.formWidth = num;
            }
            Form activeForm = Form.ActiveForm;
            this.lblPrompt.Text = this.mText;
            this.Text = this.mCaption;
            this.SetButtonText();
            this.SetMessIcon();
            this.SetDefaultButton();
            Size size = TextRenderer.MeasureText(strMaxLengthLine, this.lblPrompt.Font);
            base.Width = (int) this.formWidth;
            base.Height = (((30 + this.pnlTop.Height) + this.pnlBottom.Height) + this.pnlHandle.Height) + ((int) (this.rowCount * (size.Height + 1)));
            base.StartPosition = FormStartPosition.CenterScreen;
            return base.ShowDialog(activeForm);
        }

        public DialogResult ShowDialog(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons, MessageBoxDefaultButton msgDefaultButton)
        {
            double num = 0.0;
            this.mText = text;
            this.mCaption = caption;
            this.msgButtons = msgButtons;
            this.msgIcons = msgIcons;
            this.msgDefaultButton = msgDefaultButton;
            string strMaxLengthLine = "";
            this.promptLength = this.getLengthText(text, ref strMaxLengthLine);
            this.maxWidth = ((this.MaximumSize.Width - this.pnlIcon.Width) - this.pnlRight.Width) - 15;
            this.captionLength = caption.Length;
            this.formWidth = ((this.pnlIcon.Width + (((double) (((int) this.promptLength) * this.lblPrompt.Font.Size)) / 1.77)) + this.pnlRight.Width) + 51.0;
            num = ((double) (((int) this.captionLength) * this.lblPrompt.Font.Size)) / 1.48;
            for (int i = 0; i < this.strMsgArr.Length; i++)
            {
                if ((this.strMsgArr[i] != string.Empty) && (this.strMsgArr[i] != Environment.NewLine))
                {
                    double num3 = 0.0;
                    num3 = ((double) (this.strMsgArr[i].Length * this.lblPrompt.Font.Size)) / 1.77;
                    if (num3 > this.maxWidth)
                    {
                        if ((num3 % ((double) this.maxWidth)) == 0.0)
                        {
                            this.rowCount++;
                        }
                        else
                        {
                            this.rowCount += ((((double) (this.strMsgArr[i].Length * this.lblPrompt.Font.Size)) / 1.77) / ((double) this.maxWidth)) + 1.0;
                        }
                    }
                    else
                    {
                        this.rowCount++;
                    }
                }
            }
            if (num > this.formWidth)
            {
                this.formWidth = num;
            }
            this.lblPrompt.Text = this.mText;
            this.Text = this.mCaption;
            this.SetButtonText();
            this.SetMessIcon();
            this.SetDefaultButton();
            Size size = TextRenderer.MeasureText(strMaxLengthLine, this.lblPrompt.Font);
            base.Width = (int) this.formWidth;
            base.Height = (((30 + this.pnlTop.Height) + this.pnlBottom.Height) + this.pnlHandle.Height) + ((int) (this.rowCount * (size.Height + 1)));
            base.StartPosition = FormStartPosition.CenterParent;
            return base.ShowDialog(owner);
        }
    }
}

